#ifndef EXPLORER_H
#define EXPLORER_H

#include <QtGui/QDialog>
#include <QDropEvent>
#include <QFileInfo>
#include <QTime>
#include <QUrl>
#include "ui_tagexplorer.h"
#include "browsefolder.h"

#include "nPatriciaTrie.h"
#include "client.h"
#include "linkedlist.h"
#include "tagdefs.h"
#include "getabsmod.h"
#include "tageditor.h"
#include "history.h"
#include "getabsmod.h"

class tagExplorer : public QDialog
{
    Q_OBJECT

private slots:

    void on_btnGo_clicked();
    void on_btnBack_clicked();
    void on_btnForward_clicked();
    void on_btnRefresh_clicked();
    void on_btnUp_clicked();
    //void on_AutoTag_2_clicked();
    void on_lstFiles_customContextMenuRequested(QPoint p);
    void on_lstFiles_itemDoubleClicked(QListWidgetItem *item);
    void on_lstDirs_itemDoubleClicked(QTreeWidgetItem *item,int col);
    void copyto();
    void moveto();
    void runfile();
    void openfolder();
    void tag();

public:
    tagExplorer(QWidget *parent = 0);
    ~tagExplorer();

private:
    Ui::ExplorerClass ui;
    enum Action  { COPYTO,MOVETO};
    QTime timetaken;
    char *whichfile;
    linkedlist *selectlist;
    docHistory *hst;

    void reListDirs();
    void updatebuttons();
    void dowork();
    void perform(int act);

    void dropEvent(QDropEvent *event);
    void dragEnterEvent(QDragEnterEvent *event);
};


#endif // EXPLORER_H
